package Example20;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int taijieNum=scanner.nextInt();

        System.out.println(f(taijieNum));
    }


    public static int f(int n){
        if(n<=2) return n;
        int first=1,second=2;
        int third=0;
        for(int i=3;i<=n;i++){
            third = first+second;
            first = second;
            second = third;
        }

        return third;
    }



}
